#include <bits/stdc++.h>
using i64 = long long;
using u64 = unsigned long long;
using u32 = unsigned;
using u128 = unsigned __int128;
using i128 = __int128;
using namespace std;

string solve(vector<int> a) {
    // 对于x = a[i],表示s[0, 1, 2, ...i - 1]中，有x个字符等于s[i]
    string res = "";
    char ch = 'a';
    unordered_map<char, int> mp; // 记录每个字符出现的次数
    for (int i = 0; i < a.size(); i++) {
        if (a[i] == 0) {
            res += ch;
            mp[ch] = 1;
            ch++;
        } else {
            // 当前需要加的字符和之前的某个字符相同
            for (int j = 0; j < i; j++) {
                if (mp[res[j]] == a[i]) {
                    res += res[j];
                    mp[res[j]]++;
                    break;
                }
            }
        }
        // cout << res << endl;
    }
    return res;
}

// void test() {
//     vector<int> a = {0, 0, 0, 1, 0, 2, 0, 3, 1, 1, 4};
//     cout << solve(a) << endl;
// }
int main(){
    // test();
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int t, n;
    cin >> t;
    while (t--){
        cin >> n;
        // 这里错误写成了vertor<int> a; 导致后面无法输入数据越界
        vector<int> a(n);
        for(int i = 0; i < n; i++) cin >> a[i];
        
        cout << solve(a) << endl;
    }

    return 0;
}